// 动态路由
import Layout from '@/layout'
export const asyncRoutes = [
  {
    path: '/example',
    component: Layout,
    redirect: '/example/table',
    name: 'Example',
    meta: { title: '工单管理', icon: 'iconfont icon-gongdan' },
    children: [
      {
        path: 'table',
        name: 'Table',
        component: () => import('@/views/table/index'),
        meta: { title: '运营工单' }
      },
      {
        path: 'tree',
        name: 'Tree',
        component: () => import('@/views/tree/index'),
        meta: { title: '运维工单' }
      }
    ]
  },

  {
    path: '/dianwei',
    component: Layout,
    redirect: '/dianwei/index',
    name: 'DianWei',
    meta: { title: '点位管理', icon: 'iconfont icon-dianwei' },
    children: [
      {
        path: 'quyu',
        component: () => import('@/views/dianwei/components/quyu'), // Parent router-view
        name: 'Quyu',
        meta: { title: '区域管理' }
      },
      {
        path: 'index',
        component: () => import('@/views/dianwei/index'),
        name: 'dianwei',
        meta: { title: '点位管理' }
      },
      {
        path: 'hezuoshang',
        component: () => import('@/views/dianwei/components/hezuoshang'),
        name: 'Hezuoshang',
        meta: { title: '合作商管理' }
      }
    ]
  },
  {
    path: '/shebei',
    component: Layout,
    redirect: '/shebei/index',
    name: 'Shebei',
    meta: { title: '设备管理', icon: 'iconfont icon-shebei' },
    children: [
      {
        path: 'index',
        name: 'shebei',
        component: () => import('@/views/shebei/index'),
        meta: { title: '设备管理' }
      },
      {
        path: 'zhuangtai',
        name: 'Zhuangtai',
        component: () => import('@/views/shebei/components/zhuangtai'),
        meta: { title: '设备状态' }
      },
      {
        path: 'leixing',
        name: 'Leixing',
        component: () => import('@/views/shebei/components/leixing'),
        meta: { title: '设备类型管理' }
      }
    ]
  },
  {
    path: '/people',
    component: Layout,
    redirect: '/people/index',
    name: 'People',
    meta: { title: '人员管理', icon: 'iconfont icon-renyuanguanli' },
    children: [
      {
        path: 'index',
        name: 'people',
        component: () => import('@/views/people/index'),
        meta: { title: '人员列表' }
      },
      {
        path: 'tongji',
        name: 'Tongji',
        component: () => import('@/views/people/components/tongji'),
        meta: { title: '人效统计' }
      },
      {
        path: 'gongzuo',
        name: 'Gongzuo',
        component: () => import('@/views/people/components/gongzuo'),
        meta: { title: '工作量列表' }
      }
    ]
  },
  {
    path: '/goods',
    component: Layout,
    redirect: '/goods/index',
    name: 'Goods',
    meta: { title: '商品管理', icon: 'iconfont icon-shangpin' },
    children: [
      {
        path: 'goodsclass',
        name: 'Goodsclass',
        component: () => import('@/views/goods/goodsclass'),
        meta: { title: '商品类型' }
      },
      {
        path: 'index',
        name: 'goods',
        component: () => import('@/views/goods/index'),
        meta: { title: '商品管理' }
      }
    ]
  },
  {
    path: '/celue',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/celue/index'),
        meta: { title: '策略管理', icon: 'iconfont icon-celue' }
      }
    ]
  },
  {
    path: '/orders',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/orders/index'),
        meta: { title: '订单管理', icon: 'iconfont icon-dingdan1' }
      }
    ]
  },
  {
    path: '/duizhang',
    component: Layout,
    children: [
      {
        path: '',
        component: () => import('@/views/duizhang/index'),
        meta: { title: '对账统计', icon: 'iconfont icon-quduizhang' }
      }
    ]
  }
]
